using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class CharItem : ListView.ListViewItem
{
    #region 处理被选中时的背景色
    public Image background;
    public Sprite normalBg;
    public Sprite selectedBg;

    public override void onSelected(bool selected)  //当选中/没选中的时候
    {
        this.background.overrideSprite = selected ? selectedBg : normalBg;
    }
    #endregion

    public CharacterCard cardDefine;
    public Image cardImage;
    public void SetCharInfo(CharacterCard item) // 读取角色配置信息
    {
        cardDefine = item;
        cardImage.sprite = item.charImage;

    }
}
